@extends('admin.layout')
@section('content')
@section('title',$title)
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                {{$title}}
                <small>更快的管理您的轮播图
                    @if(session('info'))
                        <span id="info" class="text-red">{{session('info')}}</span>
                    @endif
                </small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="{{url('/admin/index')}}"><i class="fa fa-dashboard"></i> Home</a></li>
                <li><a href="{{url('/admin/rollimg/add')}}">轮播图添加</a></li>
                <li class="active">用户列表</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box">
                        <div class="box-header">
                            <h3 class="box-title">快速查看轮播图</h3>
                        </div><!-- /.box-header -->
                        <div class="box-body">
                            <table id="example2" class="table table-bordered table-hover">

                               <form >
                                   <div class="row">
                                        <div class="col-md-2">

                                        </div>
                                        <div class="col-md-4 col-md-offset-6" >

                                        </div>
                                   </div>

                               </form>
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>图片</th>
                                    <th>   操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach( $data as $row)
                                <tr>
                                    <td>{{$row -> id}}</td>
                                    <td> <img src="{{asset($row -> pic)}}" width="50" height="50" alt="" /></td>
                                    <td>
                                        <a href="{{ url('/admin/rollimg/edit') }}/{{ $row -> id }}">编辑</a>
                                        <a onclick="return confirm('确认要删除吗?');" href="{{ url('/admin/rollimg/delete') }}/{{ $row -> id }}">删除</a>
                                    </td>
                                </tr>
                                @endforeach
                                </tfoot>
                            </table>
                        </div><!-- /.box-body -->
                    </div><!-- /.box -->
                </div><!-- /.col -->
            </div><!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->

    //点击修改信息
    <script>


        window.onload = function()
        {
          $('#info').fadeOut(1000);
        }

    </script>
@endsection